Skip to content

Allow resource owners to edit their resources - #490

Merged
trtajim merged 1 commit into
mainfrom
allow-owners-to-edit-resource
Oct 29, 2026
Merged

trtajim merged 1 commit into
mainfrom
allow-owners-to-edit-resource

Conversation

@trtajim

@trtajim trtajim commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Updated the edit button visibility condition in Resource.vue from can_moderate to can_moderate || is_owner.
  • Aligns frontend UI with the backend ResourcePolicy and ResourceController which already permit authors to edit their resources.

Summary by CodeRabbit

  • New Features
    • Resource owners can now see the edit button for their resources, in addition to moderators.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The resource header edit button is now visible to resource owners and moderators. The edit action and modal remain unchanged.

Changes: Resource edit visibility

Layer / File(s) Summary
Edit button visibility
resources/js/pages/Resource.vue
The button is shown when is_owner or can_moderate is true. Its label now describes owner and moderator access.

Priority: Not assessed

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: thetahsinshahriar

Merge Risk: Low · up to 98b62

Banned owners see an edit interface that cannot succeed; align the controls with effective update authorization before merging.

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit d912007 into main Oct 29, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the allow-owners-to-edit-resource branch October 29, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant